// javamaps
// Copyright (c) 2010 nume_autor
package Core;
import java.util.*;
import java.awt.Image;
import Data.*;
import java.io.*;

public interface IMapProvider {
    // Map information.
    String Name();
    int ZoomLevels();
    Region MapBounds();
    Region2D MapBounds(int zoomLevel);
    IProjection Projection();

    // Layers.
    int LayerCount();
    boolean HasLayer(LayerType layerType);
    ILayer GetLayer(ObjectId layerId);
    Iterator<ILayer> GetLayerIterator();

    // Tiles.
    double TileSize();
    int TileCount(int zoomLevel);
    TileInfo GetTile(Point point, int zoomLevel);
    void GetTiles(Region2D region, int zoomLevel, List<TileInfo> list);
    Image LoadTile(ObjectId tileId);

    // Nodes.
    int NodeNumber();
    Iterator<Node> GetNodeIterator();
    Node GetNode(ObjectId nodeID);

    // Streets.
    int StreetCount();
    //TODO
    Iterator<Street> GetStreetIterator();
    Street GetStreet(ObjectId streetID);
    Color StreetColor(StreetType streetType);

    // Markers.
    int MarkerCount(ObjectId layerID);
    Iterator<Marker> GetMarkerIterator(ObjectId layerID);
    Marker GetMarker(ObjectId markerID, ObjectId layerID);
    Image LoadMarkerIcon(ObjectId layerID) throws IOException;

    // Map operations.
    void Load(String location) throws IOException, IllegalStateException;
    void Save(String location) throws IOException;
}